package com.example.qcweb;

import android.os.Environment;

import java.io.File;

public class DirManager {
    public static final String PACKAGE_NAME = "com.example.qc";
    public static final String PATH = "/data" + Environment.getDataDirectory().getAbsolutePath() + "/" + PACKAGE_NAME + "/";

    public static void createProjectDir() {
        String imageString = PATH + "Image";
        File Image = new File(imageString);
        if (!Image.exists()) {
            Image.mkdirs();
        }

        String videoString = PATH + "Video";
        File Video = new File(videoString);
        if (!Video.exists()) {
            Video.mkdirs();
        }

        String userString = PATH + "XmlUser";
        File User = new File(userString);
        if (!User.exists()) {
            User.mkdirs();
        }

        String xmlsourString = PATH + "XmlSource";
        File XmlSource = new File(xmlsourString);
        if (!XmlSource.exists()) {
            XmlSource.mkdirs();
        }

        String xmltargetsString = PATH + "XmlTarget";
        File XmlTarget = new File(xmltargetsString);
        if (!XmlTarget.exists()) {
            XmlTarget.mkdirs();
        }
        String databasestringString = PATH + "databases";
        File dataFile = new File(databasestringString);
        if (!dataFile.exists()) {
            dataFile.mkdirs();
        }

    }

    public static String getXmlSourcePath() {
        String xmlsourcepath = PATH + "XmlSource";
        return xmlsourcepath;
    }

    public static String getXmlUserPath() {
        String xmluserpathString = PATH + "XmlUser";
        return xmluserpathString;
    }
}


